import axios from "axios";
import {BASE_URL} from "../constant/HttpConstant";
import {logD} from "../utils/LogUtils";

export function login(username: string, password: string, then) {
    axios.post(BASE_URL + "/login", {
        "username": username, "password": password
    }).then((response) => {
        logD(response)
        //第一步，保存session
        //第二部，反馈登录
        sessionStorage.setItem("login", "true")
    })
}